package com.ct.ecommerce.framework.enums;

/**
 * @author changtong
 * @date 2021-50-20
 */
public enum BizKeyEnum {
    /**
     * 支付类型：1支付宝 2微信 3网银
     */
    PaymentCenter(1, "支付中心"),
    OrderCenter(2, "订单中心"),
    GoodsCenter(3, "商品中心");

    private final int value;

    private final String showName;

    BizKeyEnum(int value, String showName) {
        this.value = value;
        this.showName = showName;
    }

    public static BizKeyEnum valueOf(int value) {
        for (BizKeyEnum s : BizKeyEnum.values()) {
            if (s.value == value) {
                return s;
            }
        }
        throw new IllegalArgumentException(String.format("值%s不能转换成枚举", value));
    }


    public String getShowName() {
        return showName;
    }

    public int getValue() {
        return value;
    }
}
